#include<stdio.h>
struct Point
{
int x, y;
};
int main()
{
struct Point p1 = {1, 2};
// p2 is a pointer to structure p1
struct Point *p2 = &p1;
// Accessing structure members using structure pointer
printf("%d %d", p2->x, p2->y);
return 0;
}
#include<stdio.h>
#include<stdlib.h>
main()
{
int *p;
p=(int*)calloc(3*sizeof(int));
printf("Enter first number\n");
scanf("%d",p);
printf("Enter second number\n");
scanf("%d",p+2);
printf("%d%d",*p,*(p+2));
free(p);
}
int* p;